Repository navigation
fix(scripts): measure-self-test-floor's probe awards HELD only on a printed handshake, never on a bare non-zero exit - #15372
Merged
Conversation
…rinted handshake `probeEarlyReturn` decided its verdict on the mutated run's exit code alone (`mut.status === 0 ? 'DEFEATED' : 'HELD'`), so a dispatch spelled `process.exit(runSelfTest() === 0 ? 0 : 1)` scored HELD: the early return makes `runSelfTest()` yield `undefined`, `undefined === 0` is false, and the process exits 1 having printed ZERO BYTES. Nothing noticed anything. The row already carried `mutatedBytes` and `mutatedHead`; the verdict just did not read them. A non-zero exit is now a hold only when the mutated run also SPOKE (printed a non-blank line — the same reading `mutatedHead` publishes and the HELD listing quotes). The silent case gets its own verdict, ACCIDENT, tallied and listed apart so the census never counts it among the holds. The verdict deliberately does not match refusal WORDING: the repair landed in three spellings and teaching this verdict any of them is the coupling #14968 is filed to remove. Additive only: `mutatedSpoke` joins the row, no `--json` key is renamed, and `classifyFloor` is untouched (ROSTER/COUNT/NONE are identical). The instrument ships no `--self-test`; its controls run inline on every invocation. A third fixture joins them — the measured accident shape — asserted to read ACCIDENT with a non-zero exit and zero bytes, plus the other direction: the handshake-protected fixture must be one that SPOKE when defeated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
baozhoutao
marked this pull request as ready for review
September 4, 2026 13:24
baozhoutao
enabled auto-merge
September 4, 2026 13:24
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #15324
probeEarlyReturn()inscripts/measure-self-test-floor.mjsdecided its verdict on the mutated run's exit code and nothing else:So a dispatch spelled
process.exit(runSelfTest() === 0 ? 0 : 1)scored HELD: the injected early return makesrunSelfTest()yieldundefined,undefined === 0is false, and the process exits 1 having printed zero bytes. Nothing noticed anything — the arithmetic of a comparison against a missing return value did it. That is the same accident-versus-handshake mistake this instrument exists to expose, made by the instrument on itself, and it inflates exactly the completion picture a green--probesweep is quoted for.The row already carried
mutatedBytesandmutatedHead. The verdict now reads them.What changed
A non-zero exit is a hold only when the mutated run also spoke — printed a non-blank line, the same reading
mutatedHeadalready publishes and the HELD listing already quotes (a run whose whole output is a newline has non-zero bytes and refused nothing). The verdict is three-valued:DEFEATEDHELDACCIDENTACCIDENTis tallied and listed apart in--probe, with a trailing note so the number cannot be skimmed as a hold.The verdict deliberately does not match the refusal wording. The repair landed in three spellings and teaching this verdict any of them is the coupling #14968 is filed to remove; reporting which handshake a file carries is that card's column, not this verdict's job. This is the card's own recommendation A, with C left to #14968.
Additive only.
mutatedSpokejoins the row; no--jsonkey is renamed and no row keying changes.classifyFlooris untouched.The instrument's own controls
This file ships no
--self-test— its controls run inline on every invocation, so they cannot become unrun. A third fixture joins them, the measured accident shape reduced (process.exit(runSelfTest() === 0 ? 0 : 1)over a self-test with no handshake), asserted to readACCIDENTwith a non-zero exit and zero bytes. Two further assertions pin the discriminator from both sides: the accident fixture must still produce that shape (or theACCIDENTabove would pass for the wrong reason), and the handshake-protected fixture must be one that spoke when defeated.Ablation, on the committed implementation: reverting only the verdict expression back to the exit-code-only form (mutation confirmed on disk — new expression 0 hits, old expression 1 hit, blob hash differs from the
HEADblob; the instrument is run directly as source, so there is no build step to reach) makes the instrument refuse itself,exit 1:Restore proven by hash: restored blob
00f6d4d6ee85eeb8c00710b2f4fcc66750d2f9afequals theHEADblob, andgit diff HEADis empty.Before / after, measured
Whole population,
node scripts/measure-self-test-floor.mjs --probe --json, exit 0 both sides. Basec4d1354e3, branchcc3fc2def.scripts/audits/14744-before-update-per-row-value-census.mjsHELDACCIDENTscripts/check-turbo-task-graph.mjs(sentinel)HELDHELDscripts/check-durability-degradation-log-level.mjs(flag)HELDHELDscripts/check-parse-guard.mjs(flag)HELDHELDThe genuine holds still quote their real refusal lines, unchanged:
The card names
check-platform-checklist.mjsas the helper-spelling contrast. It cannot serve as one: itsENTRY_BY_HANDrow isnull, so it readsNOT MEASUREDon both sides and no probe run exercises the helper form at all.check-parse-guard.mjsstands in above, and the coverage gap is filed as #15371 — not addressed here.Verdict changes across the whole population: exactly one, the file named above. Every other row is byte-identical.
Floor classification is unchanged, asserted explicitly — this card is about the probe verdict, not the floor:
c4d1354e3cc3fc2defROSTERCOUNTNONEPer-file floor classification compared as an ordered
file:floorjoin: identical.--probetallies, branch:Gates, on
cc3fc2defExit codes captured by redirect before any pipe.
node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack(19 commands, derived by the script from the merge base — no hand-built change set): all 19 exit 0.check:pm-dispatch-gates(✓ dispatch-gates self-test: 1382 cases pass.),check-self-test-workflow-commands.mjsand its--self-test,check:declared-population-live,check-self-test-wired.mjsand its--self-test,check:ratchet-remedy-authority,check:nul-bytes,check:watch-hint-literal— all exit 0.scripts/, read rather than assumed clear:check-published-list-mirrors.mjs(+--self-test),check:console-injection,check:engine-double-contract,check:i18n-stale-fill— exit 0.check:published-readme-exportsis NOT MEASURED: it needs a whole-repopnpm buildthis fresh worktree has not run, and every one of its findings ispackages/**/README.mdnaming a missingdist/*.d.tswith its own remedyBuild first. Zero of its findings touch this diff's one path.pnpm lint(eslint . --no-inline-config) — exit 0, zero findings, run to completion rather than narrowed.grep -naPover the C0 set plus DEL): no matches.skip-changeset: this PR publishes nothing from any package — one file underscripts/, an internal measurement instrument with no package entry point.Same-file family, out of scope here: #14963, #14842 and #15339 remain open. #15339 in particular overlaps the file but not the function — it is about
PRODUCES_FAILUREinclassifyFloor(the static floor criterion), while this changes onlyprobeEarlyReturn's verdict; the two do not touch the same lines.🤖 Generated with Claude Code
https://claude.ai/code/session_012zGPuVVX3deAx9LdjK8jCk
Generated by Claude Code